 import { getDomCookies } from "../utils/common"

/** 现货交易系统的 headers */
export const getSpotMarketHeaders = ():RequestInit['headers'] => {
  const token = document.getElementsByTagName('iframe')?.[0]?.contentDocument?.getElementsByName('_csrf')?.[0]?.getAttribute('content') || ''
  const Cookie = getDomCookies()
  return {
    'X-Csrf-Token': token,
    Cookie
  }
}